package com.cencat.framework.core.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.cencat.framework.core.entity.TenantBaseEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TenantBaseMapper<T extends TenantBaseEntity> extends CencatBaseMapper<T> {
    
    List<T> selectByTenantId(@Param("tenantId") Long tenantId);
    
    List<T> selectByTenantCode(@Param("tenantCode") String tenantCode);
    
    List<T> selectTenantPage(IPage<T> page, @Param("tenantId") Long tenantId, @Param(Constants.WRAPPER) Wrapper<T> queryWrapper);
}